﻿using System;
using System.Windows.Forms;

namespace engine
{
    public partial class Form1 : Form
    {
        public IConsoleWindow C;
        public Form1()
        {
            InitializeComponent();
        }
        
        public static void engineInit(IConsoleWindow con, IntPtr intPtr, string p)
        {
            //throw new NotImplementedException();
            var f = new Form1 {C = con};
            f.Show();
        }

        private void Show(IConsoleWindow con)
        {
            InitializeComponent();
            C = con;
        }

        private void button1_Click(object sender, EventArgs e)
        {
            C.print(textBox1.Text);
        }

        private void button2_Click(object sender, EventArgs e)
        {
            C.error(textBox1.Text);
            C.quit();
        }
    }
}
